<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if(isset($_REQUEST["album"]))
    $rowalbum=artistModule::getAlbum($_REQUEST["album"]);
    $dataartist=artistModule::getAllArtists();
?>
<div style="width: 680px;">
    <input type="hidden" id="txtalbumkey" name="txtalbumkey" value="<?=isset($_REQUEST["album"])?$_REQUEST["album"]:""?>"/>
    <table class="tbi" style="width: 100%">
        <tr>
            <td>Artist</td>
            <td style="width: 224px;">
<!--                <input style="width: 200px" class="input_texti"
                       id="txtartistkey" name="txtartistkey"
                       value="<?//=isset($rowalbum["artist"])?$rowalbum["artist"]:""?>"/>-->
                <select id="txtartistkey" name="txtartistkey" class="input_selecti" style="width: 220px;">
                    <?
                    if($dataartist==null){
                        ?>
                        <option selected="1" value="null">Data is empty.</option>
                        <?
                    }else{
                        foreach ($dataartist as $rowartist){
                            ?>
                                <option <?=(((isset($rowalbum["artist"])?$rowalbum["artist"]:"")==(isset($rowartist["key"])?$rowartist["key"]:""))?"selected='1'":"")?> value="<?=isset($rowartist["key"])?$rowartist["key"]:"null"?>"><?=isset($rowartist["name"])?$rowartist["name"]:"artist name is empty."?></option>
                            <?
                        }
                    }
                    ?>
                    
                </select>
            </td>
            <td style="width: 84px;">Type</td>
            <td style="width: 224px;">
                <select id="cbxtype" name="cbxtype" class="input_selecti" style="width: 220px;">
                    <option selected="1" value="music">Music</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>Subject</td>
            <td>
                <input style="width: 200px" class="input_texti"
                       id="txtsubject" name="txtsubject"
                       value="<?=isset($rowalbum["subject"])?getstringhtml($rowalbum["subject"]):""?>"/>
            </td>
            <td>Track</td>
            <td>
                <input class="input_texti" style="width: 200px"
                       id="txttrack" name="txttrack"
                                     value="<?=isset($rowalbum["track_total"])?$rowalbum["track_total"]:""?>"/>
            </td>
        </tr>
        <tr>
            <td>Image</td>
            <td >
                <input style="width: 200px" class="input_texti"
                       id="txtimage" name="txtimage"
                       value="<?=isset($rowalbum["image"])?getstringhtml($rowalbum["image"]):""?>"/>
            </td>
            <td>Release</td>
            <td >
                <input style="width: 200px" class="input_texti"
                       id="txtrelease" name="txtrelease"
                       value="<?=isset($rowalbum["release"])?$rowalbum["release"]:""?>"/>
            </td>
        </tr>
        <tr >
            <td>Content</td>
            <td colspan="3">
                <textarea style="width: 540px;resize: vertical; " class="input_texti" rows="3"
                          id="txtcontent" name="txtcontent"><?=isset($rowalbum["content"])?getstringhtml($rowalbum["content"]):""?></textarea>
                
            </td>

        </tr>
        <tr id="JO_beforeerrormsg">
            <td>Insert</td>
            <td >
                <?=isset($rowalbum["insert"])?$rowalbum["insert"]:""?>
            </td>
            <td>Update</td>
            <td >
                <?=isset($rowalbum["update"])?$rowalbum["update"]:""?>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input id="btnsave" name="btnsave" type="button" value="Save" class="input_buttoni" style="float: right;"/> </td>
            <td colspan="2"><input id="btncancel" name="btncancel" type="button" value="Cancel" class="input_buttoni"/></td>
        </tr>
    </table>

</div>